export default{
  
  namespaced:true,
  
  state:()=>({
    //getStorageSync
    address: JSON.parse(uni.getStorageSync('address') || '{}'),
  }),
  mutations:{
    getAdress(state,adr){
        state.address=adr
        this.commit('my_adress/storageData')
    },
    
    storageData(state){
      uni.setStorageSync('address',JSON.stringify(state.address))
    }
  },
  getters:{
    
    /*收货地址拼接*/
    addstr(state) {
      if (!state.address.provinceName) return ''
      return state.address.provinceName + state.address.cityName + state.address.countyName + state.address.detailInfo
    }
    
    
  }
}